<script setup>
import Side from '@/components/Side.vue'
import Main from '@/components/Main.vue'
import Header from '@/components/Header.vue'
import { onMounted } from 'vue'
import Cookie from '@/utils/Cookie.js'
import request from '@/utils/request.js'
import router from '@/routers/router.js'

onMounted(()=>{
  const token = Cookie.getCookie('token');
  request.instance.get("/system/isOnLine", {
    params: {
      'token': token
    }
  }).then(res => {
    if (!res) {
      router.push('/messageplus/login');
    }
  }).catch(err => {
    router.push('/messageplus/login');
  });
})
</script>
<template>
  <Header :is-home="true"></Header>
  <table style="width: 100vw; height: calc(100vh - 70px); background-color: rgba(255,255,255,0.1); backdrop-filter: blur(30px)" cellpadding="0" cellspacing="0">
    <tr valign="top">
      <td>
        <Side></Side>
      </td>
      <td width="100%">
        <Main></Main>
      </td>
    </tr>
  </table>
</template>
<style scoped>
</style>